package com.caption.core.process;

import com.caption.core.result.TCRequest;
import com.caption.core.result.TCResponse;
import java.util.concurrent.Callable;

/**
 * 任务的适配器
 */
public class ProcessAdapter implements Callable<TCResponse> {
    private Process process;
    private TCRequest request;

    public ProcessAdapter(Process process, TCRequest request) {
        this.process=process;
        this.request=request;
    }

    @Override
    public TCResponse call() throws Exception {
        return process.invoke(request);
    }
}
